Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: group lag can be null #2448

Merged
merged 1 commit into from
Feb 17, 2023
Merged

fix: group lag can be null #2448

merged 1 commit into from
Feb 17, 2023

Conversation

holykol
Copy link
Contributor

@holykol holykol commented Feb 17, 2023

fixes 3+ hours of me trying to understand why things don't work

see https://github.com/redis/redis/blob/383d902ce68131cf40d6122ce09e305e672e8555/src/t_stream.c#L1456

change the behavior so that if lag is null, the group lag will be set to 0 instead of returning an error

Copy link
Collaborator

@monkey92t monkey92t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, thanks!

@monkey92t monkey92t merged commit 3b5361d into redis:master Feb 17, 2023
@monkey92t
Copy link
Collaborator

This is a new field in redis7, so we don't need to port to v8.

@@ -2057,7 +2057,7 @@ func (cmd *XInfoGroupsCmd) readReply(rd *proto.Reader) error {
}
case "lag":
group.Lag, err = rd.ReadInt()
if err != nil {
if err != nil && err != Nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a comment here would help next time someone changes this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants